<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        function foo() {
            bar.apply(null, arguments);
        }

        function bar() {
            console.log(arguments);  
        }

        foo(1,2,3,4,5);

         //var num = 1, 2;
        var num = (1, 2); // 逗号操作符，优先级小于等号，需要加括号
        // 返回后面的值




        /*仿照系统的isNaN函数*/

        function myIsNaN(target) {
            var ret = Number(target) + "";
            if(ret === 'NaN'){
                return true;
            }else{
                return false;
            }
        }


        var obj = {};
        var obj1 = {};
        console.log(obj == obj1);  //false
        // 引用值比的是地址，两个房间，返回false
        var obj2 = obj;
        console.log(obj2 === obj); //true

    </script>
</body>
</html>